<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      width: 300px;
      height: 200px;
      position: relative;
      /* background-color: green; */
      /* 	background:linear-gradient(方向,颜色1,颜色2,pink.。。。) */
      /* background:linear-gradient(#446cf9,#5b85fe) */

      /* 三分之一是红色  三分之二 黄色     最后一部分显示蓝色和绿色的渐变 */
      /* 1-线性渐变 */
      /* background: linear-gradient(red 50%,yellow 50%) */
      /* background: linear-gradient(to  right ,red 33.333%,yellow 33.3333%,yellow 66.666%,blue 66.6666%,green) */
      /*  径向渐变  radial-gradient(形状  大小 方向 , 颜色1，颜色2，颜色3.。。。。。)*/
      /* background: radial-gradient(circle closest-side at 10px  100px ,#fff 50%, red 50%); */
      background: radial-gradient(circle closest-side, red 25%, green 25%, green 50%, blue 50%, blue 75%, pink 75%, pink);
    }

    .box::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 3px;
      height: 300px;
      background-color: #fcbecb;
      z-index: -1
    }

  </style>
</head>

<body>
  <div class="box"></div>
</body>

</html>
